﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using QLNS_Public;
using QLNS_BLL;

namespace QLNS_GiaoDien
{
    public partial class uc_ThongKeDanhSachNhanVien : DevExpress.XtraEditors.XtraUserControl
    {
        public uc_ThongKeDanhSachNhanVien()
        {
            InitializeComponent();
        }
        ThongKe_BLL thongke_bll = new ThongKe_BLL();
        private void uc_ThongKeDanhSachNhanVien_Load(object sender, EventArgs e)
        {
            gridControl1.DataSource = thongke_bll.LayDuLieu();

        }
        PhongBan_Public pb = new PhongBan_Public();
        private void bbi_TimKiem_Click(object sender, EventArgs e)
        {
            pb.TenPhong = cob_TenPhongBan.Text;
            gridControl1.DataSource = thongke_bll.ThongKeNV_PhongBan(pb);
        }
        NhanVien_BLL nv = new NhanVien_BLL();
        private void cob_TenPhongBan_Click(object sender, EventArgs e)
        {
            string sql = "select TenPhong from tbl_PhongBan";
            DataTable dt = new DataTable();
            dt = nv.TaoBang(sql);
            cob_TenPhongBan.DataSource = dt;
            cob_TenPhongBan.DisplayMember = "TenPhong";
        }

        private void bbi_In_Click(object sender, EventArgs e)
        {
            cardView1.ShowPrintPreview();
        }

        private void simpleButton2_Click(object sender, EventArgs e)
        {
            cob_TenPhongBan.ResetText();
        }
    }
}
